<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateJourneyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_catalogNumber}" for="catalogNumber" />
                    <h:inputText id="catalogNumber" value="#{journeyController.selected.catalogNumber}" title="#{bundle.CreateJourneyTitle_catalogNumber}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_catalogNumber}"/>
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_name}" for="name" />
                    <h:inputText id="name" value="#{journeyController.selected.name}" title="#{bundle.CreateJourneyTitle_name}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_type}" for="type" />
                    <h:inputText id="type" value="#{journeyController.selected.type}" title="#{bundle.CreateJourneyTitle_type}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_type}"/>
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_code}" for="code" />
                    <h:inputText id="code" value="#{journeyController.selected.code}" title="#{bundle.CreateJourneyTitle_code}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_code}"/>
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_description}" for="description" />
                    <h:inputText id="description" value="#{journeyController.selected.description}" title="#{bundle.CreateJourneyTitle_description}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_description}"/>
                    <h:outputLabel value="#{bundle.CreateJourneyLabel_price}" for="price" />
                    <h:inputText id="price" value="#{journeyController.selected.price}" title="#{bundle.CreateJourneyTitle_price}" required="true" requiredMessage="#{bundle.CreateJourneyRequiredMessage_price}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{journeyController.create}" value="#{bundle.CreateJourneySaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{journeyController.prepareList}" value="#{bundle.CreateJourneyShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
